<template>
    <div class="page-dome25">
        888
        <ul>
            <li v-for="p in list" :key="p.id">
                {{ p.name }} --{{ p.age }}
            </li>
        </ul>
    </div>
</template>


<script setup lang="ts" name="pageDome25">
import { defineProps,withDefaults } from 'vue';
import { type Persons } from '../../types';
// 接受list +限制类型
defineProps<{list:Persons}>();
/*
withDefaults(defineProps<{ list: Persons }>(),{
    list:()=>[{id:'10001',name:"默认",age:18}]
})
*/
</script>

<style lang="scss" scoped></style>